rangeOf

Constructs an input range over an image For every pixel get x + y and the color value

Will allocate a new SwappableImage to wrap around the image given on the heap. The returned input range will auto deallocate the SwappableImage that was allocated when it becomes empty.

TODO: Scan line version of this?

  1. auto rangeOf(SwappableImage!Color* from)
  2. auto rangeOf(Image from, IAllocator allocator)
    @trusted
    rangeOf
    (
    Image
    )
    (
    Image from
    ,
    IAllocator allocator = theAllocator()
    )
    if (
    isImage!Image
    )

Parameters

from Image

The image to create a range upon

allocator IAllocator

The allocator to allocate the SwappableImage instance on the heap. Will auto free it when destructed.

Return Value

Type: auto

An input range to get every pixel along with its X and Y coordinates.

Meta